Skip to content

Fix NPE if canVibrate fails due to controller unplugged#49

Merged
Tom-Ski merged 1 commit into
libgdx:masterfrom
Berstanio:fix/can-vibrate-npe
Jun 8, 2025
Merged

Fix NPE if canVibrate fails due to controller unplugged#49
Tom-Ski merged 1 commit into
libgdx:masterfrom
Berstanio:fix/can-vibrate-npe

Conversation

@Berstanio
Copy link
Copy Markdown
Contributor

canVibrate would be null when reaching the catch block, but it will fall through the return statement, leading to a NPE.

Fixes #44

@Tom-Ski Tom-Ski merged commit 624d588 into libgdx:master Jun 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException in JamepadController: this.canVibrate is null

2 participants